package com.bl.car.repositiy;

import com.bl.car.entity.Car;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 车辆数据接口
 *
 * @author zhx
 * @create 2017-11-16 13:42
 **/
@Repository
public interface CarRepository extends JpaRepository<Car,Long>{

    @Query(value="select a from Car a where a.driverId in ?1")
    List<Car> findByDriverId(List<String> driverId);

    Car findByDriverId(String driverId);


    List<Car> findByIsEffect(String effect);
}
